﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace huaguwang.hgmanage
{
    public partial class login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string strMsg = string.Empty;
            if (this.Exp_Login("huaguwang", "huaguwang", Session["CheckCode"].Exp_Trim(), out strMsg))
            {
                Response.Redirect("main.aspx");
            }
        }
        
        protected void Btn_Submit_Click(object sender, EventArgs e)
        {
            var name = this.txt_admin.Text.Trim();
            var pass = this.txt_Psw.Text.Trim();
            var code = this.txt_Code.Text.Trim();
            string strMsg = string.Empty;
            if (this.Exp_Login(name, pass, code, out strMsg))
            {
                Response.Redirect("main.aspx");
            }
            else 
            {
                Page.Exp_PageAlter(strMsg);
            }
        }
    }
}